package com.zhuqi.netty.handler;

import com.zhuqi.proto.HeartBeat;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * <p>心跳消息返回</p>
 * @author zhuqi
 * @since 2023/3/10 14:19
 */
@Slf4j
public class HeartBeatResponseHandler extends SimpleChannelInboundHandler<HeartBeat.HeartBeatResponse> {

	/**
	 * 客户端心跳 回应
	 * pong
	 */
	@Override
	protected void channelRead0(ChannelHandlerContext ctx, HeartBeat.HeartBeatResponse msg) {
		log.info("服务器心跳响应 msg:{}", msg.getContent());
	}
}
